{{ def show(products, width=4, function='product'): }}
<table>
    {{ for i, product in enumerate(products): }}
        {{ if i == 0: }}
    <tr>
        {{ elif i % width == 0: }}
    </tr>
    <tr>
        {{ pass }}
        <td style="text-align: center">
            <a href="{{= URL(r=request, f=function, args=pretty_url(product.id, product.name)) }}">
                <img src="{{= URL(r=request, f='show', args=product.small_image) }}" height="100px"/>
                <div>{{= product.name }}</div>
            </a>
        </td>
    {{ pass }}
    </tr>
</table>
{{ return }}